package Code.Encapsulation;

public class GirlFriendTest {
    public static void main(String[] args) {

        //创建对象
        GirlFriend g1 = new GirlFriend();

        //赋值

        g1.setName("小诗诗");
        g1.setAge(18);
        g1.setGender("女");

        //获取对象
        System.out.println(g1.getName());
        System.out.println(g1.getAge());
        System.out.println(g1.getGender());

        g1.sleep();
        g1.eat();



    }
}
